package com.chenfan.mcn.enums;


/**
 * @Author liuyang
 * @Date 2021/6/23
 * @Time 17:35
 * @Version V1.0
 **/
public enum AnnualTypeEnum {
    /**
     * 客户返点类型
     */
    SINGLE_REBATE(1, "单笔返点"),

    ANNUAL_REBATE(2, "年度返点");

    private final int code;
    private final String statusName;

    AnnualTypeEnum(int code, String statusName) {
        this.code = code;
        this.statusName = statusName;
    }

    public int code() {
        return this.code;
    }

    public static String getStatusName(int code) {
        for (AnnualTypeEnum status : AnnualTypeEnum.values()) {
            if (status.code == code) {
                return status.statusName;
            }
        }
        return null;
    }
}
